This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jan 24, 2013, 11:02 AM
1 Posts

Type Ahead Validation

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role:
  • Tags: Type Ahead
  • Replies: 2
Hello,
 
I'm new in Xpage and I need to add a editbox with a Type ahead feature.
The type ahead feature is helpful, but it doesn't prevent users from entering inexisting values to the list.
There is a way to add a validation on the field to obligate the user to select some value of the list on the type-ahead?  
 
thanks 
Jan 31, 2013, 2:02 PM
8 Posts
Re: Type Ahead Validation
I think you can try using Edit Box Events(OnKeyDown or OnChange). Get entered value and compare with existing type ahead values which you must have stored somewhere.
Jan 31, 2013, 2:59 PM
31 Posts
Re: Type Ahead Validation
In your input control that has typeahead attached to it & if you also have a picker associated with it, you can add a pickervalidator.
 
<xp:this.validators>
      <xe:pickerValidator for="namePicker1"
                message="The value is invalid">
    </xe:pickerValidator>
</xp:this.validators>
 
which (in my testing) will get triggered when you submit the page. 
 
Take a look at the Domino_Pickers.xsp in the XPages Extension Library Demo Db available on OpenNTF: http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=XPages%20Extension%20Library

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal